<section id="housePreview" class="housePreview">
  <div class="house-preview-container">
    <div class="house-preview-title">房源分享</div>

    <div class="house-resource" v-if="data.projectInfo.projectId">
      <div class="house-tips">推荐资源</div>
      <div class="mt-15 clearfix line-height-34 plr-12">
        <div class="pull-left color-999">租赁类型</div>
        <div class="pull-right color-666">{{data.contractType == 'ER' ? '整租' : '工位'}}</div>
      </div>
      <div class="clearfix line-height-34 plr-12">
        <div class="pull-left color-999">推荐项目</div>
        <div class="pull-right color-666">{{data.projectInfo.projectName}}</div>
      </div>

      <div class="house-sharing-warp text-center">
        <div v-if="data.projectInfo.units.length">
          <div class="title"><span>推荐单元</span></div>
          <div class="dy-flex line-height-40">
            <div class="dy-fx-1">楼宇</div>
            <div class="dy-fx-1">楼层</div>
            <div class="dy-fx-1">单元</div>
          </div>
          <div class="dy-flex line-height-40 bg-F8FAFF list-house" v-for="item in data.projectInfo.units">
            <div class="dy-fx-1">{{item.buildingName}}</div>
            <div class="dy-fx-1">{{item.floorNum}}</div>
            <div class="dy-fx-1">{{item.unitName}}</div>
          </div>
        </div>
        <div v-if="data.projectInfo.wps.length">
          <div class="title"><span>推荐工位</span></div>
          <div class="dy-flex line-height-40">
            <div class="dy-fx-1">楼宇</div>
            <div class="dy-fx-1">楼层</div>
            <div class="dy-fx-1">单元</div>
            <div class="dy-fx-1">工位</div>
          </div>
          <div class="dy-flex line-height-40 bg-F8FAFF list-house" v-for="item in data.projectInfo.wps">
            <div class="dy-fx-1">{{item.buildingName}}</div>
            <div class="dy-fx-1">{{item.floorNum}}</div>
            <div class="dy-fx-1">{{item.unitName}}</div>
            <div class="dy-fx-1">{{item.wpName}}</div>
          </div>
        </div>
        <div v-if="data.projectInfo.stops.length">
          <div class="title"><span>推荐车位</span></div>
          <div class="dy-flex line-height-40">
            <div class="dy-fx-1">楼宇</div>
            <div class="dy-fx-1">楼层</div>
            <div class="dy-fx-1">单元</div>
            <div class="dy-fx-1">车位</div>
          </div>
          <div class="dy-flex line-height-40 bg-F8FAFF list-house" v-for="item in data.projectInfo.stops">
            <div class="dy-fx-1">{{item.buildingName}}</div>
            <div class="dy-fx-1">{{item.floorNum}}</div>
            <div class="dy-fx-1">{{item.unitName}}</div>
            <div class="dy-fx-1">{{item.stopName}}</div>
          </div>
        </div>
      </div>
    </div>
    <div class="mt-15">
      <div class="house-innerEditor">
        <div style="font-size: 22px;color: #333" class="mb-20">{{data.shareTitle}}</div>
        <div ref="houseInfo"></div>
      </div>
    </div>


    <div class="text-center">
      <hl-button type="primary" @on-click="back">返回</hl-button>
    </div>
  </div>
</section>

<style media="screen">
  body,
  html {
    background: #fff !important;
  }

  .bg-F8FAFF {
    background: rgba(248, 250, 255, 1);
  }

  .house-preview-container {
    max-width: 1200px;
    margin: 50px auto;
  }

  .house-preview-title {
    height: 66px;
    background-color: rgba(68, 73, 135, 1);
    font-size: 16px;
    color: #fff;
    line-height: 66px;
    text-align: center;
  }

  .house-resource {
    max-width: 750px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 0px 6px 0px rgba(177, 177, 177, 0.5);
    box-sizing: border-box;
    border-radius: 4px;
    padding: 10px 15px 0;
    margin: 30px auto 20px;
  }

  .house-tips {
    position: relative;
    line-height: 34px;
    padding-left: 10px;
  }

  .house-tips::before {
    content: '';
    position: absolute;
    left: -5px;
    top: 9px;
    width: 6px;
    height: 16px;
    background: rgba(244, 174, 71, 1);
  }

  .house-sharing-warp {
    margin-left: -15px;
    margin-right: -15px;
  }

  .house-sharing-warp .title {
    line-height: 34px;
    margin-top: 25px;
    margin-bottom: 12px;
    background-image: url('assets/images/panel_title_dec@2x.png');
    background-size: 20%;
    background-position: center;
    margin-left: 10px;
    margin-right: 10px;
    background-repeat: repeat-x;
  }

  .house-sharing-warp .title span {
    background: #fff;
    padding: 0 18px;
  }

  .list-house {
    margin-top: 1px;
  }

  .house-innerEditor {
    max-width: 750px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0px 0px 6px 0px rgba(177, 177, 177, 0.5);
    box-sizing: border-box;
    border-radius: 4px;
    padding: 15px;
    margin: 0 auto 20px;
  }

  .house-innerEditor img {
    max-width: 100% !important;
    max-height: auto !important;
  }
</style>

<script src="modules/rent/scripts/house_preview.js" charset="utf-8"></script>